package com.by.bean.resp;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;

@ApiModel("用户查询结果")
@Data
public class UserResult {
    @ApiModelProperty(value = "用户id,修改时是必须的")
    int id;

    @ApiModelProperty("头像")
    String headerimg;

    @ApiModelProperty(value = "用户名", required = true)
    @NotBlank(message = "用户名不能为空！")
    @Length(min = 6, max = 50, message = "用户名长度为6~50！")
    String username;

    @ApiModelProperty(value = "密码", required = true)
    @NotBlank(message = "密码不能为空！")
    String password;

    @ApiModelProperty("创建时间")
    String createTime;
    @ApiModelProperty("更新时间")
    String updateTime;

}
